home *** CD-ROM | disk | FTP | other *** search
/ C & C++ Multimedia Cyber Classroom / C and C++ Multimedia Cyber Classroom (Prentice Hall) (1998).iso / src / fig11_09.jar / Ch11 / Fig11_09 / Fig11_09.cpp
C/C++ Source or Header  |  1997-11-09  |  370b  |  19 lines

  1. // Fig. 11.9: fig11_09.cpp
  2. // Calculating the sum of two integers input from the keyboard 
  3. // with the cin oct and the stream-extraction operator.
  4. #include <iostream.h>
  5.  
  6. int main()
  7. {
  8.    int x, y;
  9.  
  10.    cout << "Enter two integers: ";
  11.    cin >> x >> y;
  12.    cout << "Sum of " << x << " and " << y << " is: " 
  13.         << ( x + y ) << endl;
  14.  
  15.    return 0;
  16. }
  17.  
  18.  
  19.